; Fix mid-symbol updating/cycling completion preview
authorEshel Yaron <me@eshelyaron.com>
Thu, 1 Feb 2024 11:30:24 +0000 (12:30 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 21 Feb 2024 16:47:12 +0000 (17:47 +0100)
commite6882a5cc89d9375dfa73156db6836af19ef7b8a
tree446eca7a76257b0a54e376856e11cb58a31dbab4
parent35d99b1ec7c56d4a5c09af36e6bbd7f0f959cccc
; Fix mid-symbol updating/cycling completion preview

This fixes an issue where 'completion-preview-next-candidate'
would fail to take into account the part of the symbol that
follows point (the suffix) when point is at the middle of a
symbol, as well as a similar issue in 'completion-preview--show'
that would manifest with slow 'completion-at-point-functions'.

* lisp/completion-preview.el (completion-preview-next-candidate)
(completion-preview--show): Ensure that the completion preview
remains at the end of a symbol, when updating it while point is
in the middle of that symbol.

* test/lisp/completion-preview-tests.el
(completion-preview-mid-symbol-cycle): New test.  (Bug#68875)
lisp/completion-preview.el
test/lisp/completion-preview-tests.el